﻿using UIWindows.Attributes;
using XingLucifer.IBase.Enums;

namespace UIWindows.Models.ParameterModels
{
    public class SystemConfigModel : Domains.ViewModelBase
    {
        [System.Text.Json.Serialization.JsonIgnore]
        public System.Windows.Controls.Button PerformTaskName { get; set; }


        public bool IsShowWarnTip { get; set; }

        public string HomeMessage { get; set; }

        /// <summary>
        /// Fins协议需要用到,网卡IP地址最后一位
        /// </summary>
        [UIMark("Last IP")]
        public byte FinsIP { get; set; }

        /// <summary>
        /// 通信超时重连次数
        /// </summary>
        [UIMark("超时重连", "次")]
        public int CommunicationReconnectionTimes { get; set; }

        /// <summary>
        /// 称重超时
        /// </summary>
        [UIMark("称重超时", "ms")]
        public int WeighingTimeout { get; set; }

        /// <summary>
        /// 条码验证规则
        /// </summary>
        [UIMark("条码规则")]
        public string BarcodeRules { get; set; }

        /// <summary>
        /// 套杯码验证规则
        /// </summary>
        [UIMark("套杯码规则")]
        public string CupCodeRules { get; set; }

        /// <summary>
        /// 泵数量
        /// </summary>
        [UIMark("泵数量")]
        public int PumpNumber { get; set; }

        /// <summary>
        /// 站数量
        /// </summary>
        [UIMark("站数量")]
        public int StationNumber { get; set; }

        /// <summary>
        /// 杯数量
        /// </summary>
        [UIMark("杯数量")]
        public int CupNumber { get; set; }
        /// <summary>
        /// 主设备类型
        /// </summary>
        [UIMark("主设备类型", "", 2, typeof(MainDeviceTypeEnum), new string[] { null, "" })]
        public MainDeviceTypeEnum MainDeviceType { get; set; } = MainDeviceTypeEnum.前段装盘机;
        /// <summary>
        /// 短路型号
        /// </summary>
        [UIMark("短路型号", "", 2, typeof(DeviceTypes), new string[] { null, "ShortCircuit" })]
        public DeviceTypes ShortCircuit { get; set; }

        /// <summary>
        /// 出站工位
        /// </summary>
        //[UIMark("出站工位", "", 2, typeof(OutputProcessesEnum), new string[] { null, "" })]
        public OutputProcessesEnum OutputProcesses { get; set; } = OutputProcessesEnum.后称;
        /// <summary>
        /// 取一注数据
        /// </summary>
        //[UIMark("取一注数据", "", 2, typeof(GetOntDataEnum), new string[] { null, "" })]
        public GetOntDataEnum GetOntData { get; set; } =  GetOntDataEnum.其它设备获取;
        //枚举过滤不显示,第一个参数不包含为真,第二个参数为包含为真,往后为不等于则显示
        //[UIMark("测试枚举", "", 2, typeof(Enums.AuthorityTypes), new string[] { "_参照", null, "ALL", "无权限", "超级管理员" })]
        //public Enums.AuthorityTypes Authority { get; set; }
    }
}
